﻿using System;
using System.Data;
using System.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using BySoft.Server.Common.Entity;
using BySoft.Server.Business;
using BySoft.Server.Common.Enum;
using OneSoft.EntityCore;
using BySoft.Web.Utility;
using System.Reflection;
using BySoft.Server.Common.Schema;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace BySoft.Web.Site
{
    /// <summary>
    /// 各个弹出框页面的基类，封装了一些调用Js的方法
    /// </summary>
    public class BasePopPage : BasePage
    {
      

        /// <summary>
        /// 模态对话框页面关闭，回传值给父窗口的控件
        /// </summary>
        /// <param name="txtclientID"></param>
        /// <param name="txt"></param>
        /// <param name="valclientID"></param>
        /// <param name="val"></param>
        protected void ModalDialogClose(string txtclientID, string txt, string valclientID, string val, string buttonId, string fatherControls, string fatherText)
        {
            StringBuilder strbuilder = new StringBuilder();
            strbuilder.Append("<script>");
            strbuilder.Append("modaldialogclose('" + txtclientID + "','" + valclientID + "','" + txt + "','" + val + "','" + buttonId + "','" + fatherControls + "','" + fatherText + "');");
            strbuilder.Append("</script>");

            ClientScript.RegisterStartupScript(this.GetType(),
                Guid.NewGuid().ToString(), strbuilder.ToString());
        }
        

        /// <summary>
        /// 关闭本窗口
        /// </summary>
        protected void CloseSelf()
        {
            ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "<script>window.close();</script>");
        }


    }
}
